package com.suray.system.run.data;

import java.util.HashMap;
import java.util.Map;

public class SystemMonitorInformation {
    /**
     * Rgv信息
     */
    protected Map<String, RgvInformation> rgvs;

    /**
     * 提升机信息
     */
    protected Map<String, LifterInformation> lifters;

    /**
     * 输送线信息
     */
    protected Map<String, ConveryInfomation> converys;

//    protected TaskInfomation taskInfomation;

    protected int totalCargoSpaceNum;

    protected int freeCargoSpaceNum;

    public SystemMonitorInformation() {
        rgvs = new HashMap<String, RgvInformation>();
        lifters = new HashMap<String, LifterInformation>();
        converys = new HashMap<String, ConveryInfomation>();
    }

    /**
     * 获取小车信息
     * @param series
     * @return
     */
    public RgvInformation getRgvInformation(String series) {
        RgvInformation rgvInformation = rgvs.get(series);

        if (rgvInformation == null) {
            rgvInformation = new RgvInformation();
            rgvs.put(series, rgvInformation);
        }

        return rgvInformation;
    }

    /**
     * 获取提升机信息
     * @param series
     * @return
     */
    public LifterInformation getLifterInformation(String series) {
        LifterInformation lifterInformation = lifters.get(series);

        if (lifterInformation == null) {
            lifterInformation = new LifterInformation();
            lifters.put(series, lifterInformation);
        }

        return lifterInformation;
    }

    /**
     * 获取输送线信息
     * @param series
     * @return
     */
    public ConveryInfomation getConveryInformation(String series) {
        ConveryInfomation converyInfomation = converys.get(series);

        if (converyInfomation == null) {
            converyInfomation = new ConveryInfomation();
            converys.put(series, converyInfomation);
        }

        return converyInfomation;
    }

    public int getTotalCargoSpaceNum() {
        return totalCargoSpaceNum;
    }

    public void setTotalCargoSpaceNum(int totalCargoSpaceNum) {
        this.totalCargoSpaceNum = totalCargoSpaceNum;
    }

    public int getFreeCargoSpaceNum() {
        return freeCargoSpaceNum;
    }

    public void setFreeCargoSpaceNum(int freeCargoSpaceNum) {
        this.freeCargoSpaceNum = freeCargoSpaceNum;
    }

    public Map<String, RgvInformation> getRgvs() {
        return rgvs;
    }

    public Map<String, LifterInformation> getLifters() {
        return lifters;
    }

    public Map<String, ConveryInfomation> getConverys() {
        return converys;
    }
}
